	<div class="panel-header">
		最新文章
	</div>
	<!-- 表格容器 -->
	<div id="table-box" class="table-box">

		<table class="table table-hover">

			<thead>
			<tr>
				<th>ID</th>
				<th>标题</th>
				<th>创建时间</th>
				<th>发布</th>

				<th class="operation">操作</th>
			</tr>
			</thead>

			<tbody>
			#for (x : latestArticle)
			<tr>
				<td>#(x.id)</td>
				<td><a href="/admin/article/preview?id=#(x.id)" target="_blank">#(x.title)</a></td>
				<td>#date(x.created)</td>

				<td>
					<div class="custom-control custom-switch">
						<input #(x.state == 1 ? 'checked':'') url='/admin/article/publish?id=#(x.id)' type="checkbox" class="custom-control-input" id="id-#(x.id)">
						<label class="custom-control-label" for="id-#(x.id)"></label>
					</div>
				</td>

				<td class="operation">
					<a fill pushState="false" url="/admin/article/edit?id=#(x.id)&pn=1">修改</a> |

					### 这里用 url 代替 href 是为了防止意外删除数据
					<a confirm="确定删除 #escape(x.title) ？" ok-remove="tr" url="/admin/article/delete?id=#(x.id)">删除</a>
				</td>
			</tr>
			#end
			</tbody>
		</table>
	</div>


